package com.study.example.study.extension.easyexcel.read;

import com.alibaba.excel.read.listener.ReadListener;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * easyexcel 测试 读数据策略接口 实现
 *
 * @author RenYuLiang
 */
@Log4j2
@Component
public class TestEasyExcelReadDataHandlerStrategy implements EasyExcelReadDataStrategy<EasyExcelReadDataDemoDTO> {


    /**
     * 指定读用哪个 class 去读
     *
     * @return Class
     */
    @Override
    public Class<?> getReadClass() {
        return EasyExcelReadDataDemoDTO.class;
    }

    /**
     * 读处理类
     *
     * @return ReadListener
     */
    @Override
    public ReadListener<EasyExcelReadDataDemoDTO> getReadListener() {
        return new TestEasyExcelReadListener();
    }

}
